"""
__author__ = 'berlinyoung'
@File   :test_member_add.py
@Date   :2022/6/7 22:15
-*- coding: utf-8 -*-
"""
import time

import allure

from weixin_api.step4.src.member_charge import MemberCharge



@allure.feature("API删除成员")
class TestMemberAdd:
    def setup(self):
        self.member = MemberCharge()

    def teardowm(self):
        pass

    @allure.step("删除成员成功,errmsg为空，errcode为0")
    def test_delete_success(self):
        self.member.add()
        time.sleep(5)
        r = self.member.delete()
        print(r)
        print(r["errmsg"])
        assert r.get("errcode") == 0

    # @allure.step("删除成员因失败,errmsg为XX，errcode为XX")
    # def test_delete_fail(self):
    #     r = self.member.delete()
    #     print(r)
    #     assert r.get("errcode") == 0

